<template>
<view :style="'height:'+screenHeight+'px'">
  <slot />
</view>
</template>

<script setup>
import {onLoad} from "@dcloudio/uni-app";
import {ref} from "vue";

const screenHeight = ref(800)

onLoad((options) => {
  uni.getSystemInfo({ //设置屏幕高度
    success: res => {
      //减去tabbar的高度，默认为50px
      screenHeight.value = res.screenHeight - 80
    }
  })
})
</script>

<style scoped>

</style>